package com.ljx.rbac.service.impl;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.ljx.rbac.domain.entity.Role;
import com.ljx.rbac.mapper.RoleMapper;
import com.ljx.rbac.service.RoleService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * @Author: LiJunXi
 * @Description:
 * @Date: 2024-10-03  21:35
 */
@Service
public class RoleServiceImpl extends ServiceImpl<RoleMapper, Role> implements RoleService {

    @Autowired
    private RoleMapper roleMapper;

    @Override
    public List<Long> getUserRoleIdByUserId(Long userId) {
        return roleMapper.getUserRoleByUserId(userId);
    }

    @Override
    public List<Role> getRoleByIds(List<Long> roleIds) {
        return listByIds(roleIds);
    }
}
